package org.yefei.homeworkday08;

import java.util.Scanner;

public class ArraysNine {

	public static void main(String[] args) {
//		4：输出倒等腰三角形，高度由用户输入。从下往上*的个数分别是1,3,5,...每次加两个。比如如下是高度为4的三角形 
//		   *******
//		    *****
//		     ***
//		      * 
		Scanner sc = new Scanner(System.in);
		System.out.println("输入三角形的行高：");
		int h = sc.nextInt();
		for (int i = h; i > 0; i--) {
			for (int j = 1; j <= h - i; j++) {
				System.out.print(" ");
			}
			for (int j = 1; j <= 2 * i - 1; j++) {
				System.out.print("*");
			}
			System.out.println();
		}
	}

}
